//
//  ZZTextViewChainModel.m
//  ZZFLEXDemo
//
//  Created by lbk on 2018/1/24.
//  Copyright © 2018年 lbk. All rights reserved.
//

#import "ZZTextViewChainModel.h"

#define     ZZFLEX_CHAIN_TEXTVIEW_IMPLEMENTATION(methodName, ZZParamType)      ZZFLEX_CHAIN_IMPLEMENTATION(methodName, ZZParamType, ZZTextViewChainModel *, UITextView)
#define     ZZFLEX_CHAIN_SCROLLVIEW_IMPLEMENTATION(methodName, ZZParamType)      ZZFLEX_CHAIN_IMPLEMENTATION(methodName, ZZParamType, ZZTextViewChainModel *, UITextView)


@implementation ZZTextViewChainModel

ZZFLEX_CHAIN_TEXTVIEW_IMPLEMENTATION(delegate, id<UITextViewDelegate>);

ZZFLEX_CHAIN_TEXTVIEW_IMPLEMENTATION(text, NSString *);
ZZFLEX_CHAIN_TEXTVIEW_IMPLEMENTATION(font, UIFont *);
ZZFLEX_CHAIN_TEXTVIEW_IMPLEMENTATION(textColor, UIColor *);

ZZFLEX_CHAIN_TEXTVIEW_IMPLEMENTATION(textAlignment, NSTextAlignment);
ZZFLEX_CHAIN_TEXTVIEW_IMPLEMENTATION(selectedRange, NSRange);
ZZFLEX_CHAIN_TEXTVIEW_IMPLEMENTATION(editable, BOOL);
ZZFLEX_CHAIN_TEXTVIEW_IMPLEMENTATION(selectable, BOOL);
ZZFLEX_CHAIN_TEXTVIEW_IMPLEMENTATION(dataDetectorTypes, UIDataDetectorTypes);

ZZFLEX_CHAIN_TEXTVIEW_IMPLEMENTATION(keyboardType, UIKeyboardType);

ZZFLEX_CHAIN_TEXTVIEW_IMPLEMENTATION(allowsEditingTextAttributes, BOOL);
ZZFLEX_CHAIN_TEXTVIEW_IMPLEMENTATION(attributedText, NSAttributedString *);
ZZFLEX_CHAIN_TEXTVIEW_IMPLEMENTATION(typingAttributes, NSDictionary *);

ZZFLEX_CHAIN_TEXTVIEW_IMPLEMENTATION(clearsOnInsertion, BOOL);

ZZFLEX_CHAIN_TEXTVIEW_IMPLEMENTATION(textContainerInset, UIEdgeInsets);
ZZFLEX_CHAIN_TEXTVIEW_IMPLEMENTATION(linkTextAttributes, NSDictionary *);

#pragma mark - UIScrollView
ZZFLEX_CHAIN_SCROLLVIEW_IMPLEMENTATION(contentSize, CGSize)
ZZFLEX_CHAIN_SCROLLVIEW_IMPLEMENTATION(contentOffset, CGPoint)
ZZFLEX_CHAIN_SCROLLVIEW_IMPLEMENTATION(contentInset, UIEdgeInsets)

ZZFLEX_CHAIN_SCROLLVIEW_IMPLEMENTATION(bounces, BOOL)
ZZFLEX_CHAIN_SCROLLVIEW_IMPLEMENTATION(alwaysBounceVertical, BOOL)
ZZFLEX_CHAIN_SCROLLVIEW_IMPLEMENTATION(alwaysBounceHorizontal, BOOL)

ZZFLEX_CHAIN_SCROLLVIEW_IMPLEMENTATION(pagingEnabled, BOOL)
ZZFLEX_CHAIN_SCROLLVIEW_IMPLEMENTATION(scrollEnabled, BOOL)

ZZFLEX_CHAIN_SCROLLVIEW_IMPLEMENTATION(showsHorizontalScrollIndicator, BOOL)
ZZFLEX_CHAIN_SCROLLVIEW_IMPLEMENTATION(showsVerticalScrollIndicator, BOOL)

ZZFLEX_CHAIN_SCROLLVIEW_IMPLEMENTATION(scrollsToTop, BOOL)

@end

ZZFLEX_EX_IMPLEMENTATION(UITextView, ZZTextViewChainModel)
